<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use common\components\widgets\Datetimepicker;
Datetimepicker::widget(['timepicker' => 'true','datepicker'=>'false','format'=>'H:i','step'=>'5']);
?>

<?php $form = ActiveForm::begin(['enableClientValidation' => true, 'enableAjaxValidation' => false, 'options' => ['class' => 'form-validate']]); ?>
<table width="100%" class="table-form">
    <tr>
        <th class="zx-goods-table">请选择教室</th>
        <td style="display: inline-block;width: 206px"><?= $form->field($model, 'classroom_id', ['template' => '{input}{error}{hint}'])->widget(\kartik\select2\Select2::className(),['data'=>$classroom,'options' => ['placeholder' => '请选择 ...']]) ?></td>
    </tr>
    <tr>
        <th class="zx-goods-table"><?=$model->attributeLabels()['classday']; ?></th>
        <td style="display: inline-block;width: 206px"><?= $form->field($model, 'classday', ['template' => '{input}{error}{hint}'])->widget(\kartik\select2\Select2::className(),['data'=>[ 1=>'周一', 2=>'周二', 3=>'周三', 4=>'周四', 5=>'周五', 6=>'周六', 7=>'周日',],'options' => ['placeholder' => '请选择']]) ?></td>
    </tr>
    <tr>
        <th class="zx-goods-table"><?= $model->attributeLabels()['start_time']; ?></th>
        <td><?= $form->field($model, 'start_time', ['template' => '{input}{error}{hint}'])->textInput(['class' => 'datetimepicker']) ?></td>
    </tr>
    <tr>
        <th class="zx-goods-table"><?= $model->attributeLabels()['end_time']; ?></th>
        <td><?= $form->field($model, 'end_time', ['template' => '{input}{error}{hint}'])->textInput(['class' => 'datetimepicker']) ?></td>
    </tr>

</table>
<div style="display: none"><?= Html::submitButton('提交', ['id'=>'dosubmit']) ?></div>
<?php ActiveForm::end(); ?>

